from django.db import models

# Create your models here.
class Authors(models.Model):
    name  =  models.CharField(max_length=32)
    email  =  models.EmailField()
    def __str__(self):
        return '%s' %(self.name)
class Publisher(models.Model):
    name  =  models.CharField(max_length=64,null=True,blank=True)
    city  =  models.CharField(max_length=64,null=True,blank=True)
    conutry  =  models.CharField(max_length=64,null=True,blank=True)
    website  =  models.URLField()
    def __str__(self):
        return '%s--%s' %(self.name,self.website)
class Books(models.Model):
    name = models.CharField(max_length=64,)
    author= models.ManyToManyField(Authors)
    name = models.ForeignKey(Publisher)
    publisher_date = models.CharField(max_length=64,)
    def __str__(self):
        return '%s--%s' %(self.name,self.publisher_date)